"use strict";
cc._RF.push(module, '386d7y6IZZL4boDeyZb4Oiz', 'bet_sel115_item');
// scripts/module/bet_sel115_item.js

"use strict";

// Learn cc.Class:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/class.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/class/index.html
// Learn Attribute:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/reference/attributes.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/reference/attributes/index.html
// Learn life-cycle callbacks:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/life-cycle-callbacks.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/life-cycle-callbacks/index.html

/*
 *投注球通用
*/
cc.Class({
    extends: cc.Component,

    properties: {
        labDec: cc.Label, //球正常时数字
        labSelDec: cc.Label, //球选中时数字
        labMiss: cc.Label, //遗漏时数字
        ballType: 0 //0正常1红色2黄色

    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start: function start() {},


    init: function init(data) {
        this.labDec.string = data.num;
        this.labSelDec.string = data.num;
        this.setMissNum(data.miss);
    },

    //设置球数字颜色
    setNumColor: function setNumColor(color) {
        this.labDec.node.color = color;
    },

    //设置遗漏
    setMissNum: function setMissNum(miss) {
        if (miss == "" && miss != 0) {
            this.labMiss.node.active = false;
        } else {
            this.labMiss.node.active = true;
            this.labMiss.string = miss;
        }
    },

    //设置文字
    setNum: function setNum(num) {
        this.labDec.string = num;
    },

    //得到文字
    getNum: function getNum() {
        return this.labDec.string;
    },

    //设置类型
    setType: function setType(type) {
        this.ballType = type;
    },

    //得到球类型
    getType: function getType() {
        return this.ballType;
    }

    // update (dt) {},
});

cc._RF.pop();